<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta name="author" content="www.cnadlm.com" />
<link href="<?=domain?>static/style/union.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<?=domain?>static/script/core.js" charset="utf-8"></script>
<script type="text/javascript" src="<?=domain?>static/script/home.js" charset="utf-8"></script>
<title><?=name?>-获取广告</title>
<body>
<div class="nav">
	<div class="list">
		<ul>
		  <?php
		  foreach($menu as $key=>$value){
		  ?>
		  <li><a href="<?=($value['value'])?>"><?=$value['name']?></a></li>
		  <?php
		  }
		  ?>
		 </ul>
	</div>
</div>
<div class="main">
	<div class="logo"><a href="<?=domain?>"><img src="<?=domain?>static/image/Logo.png"></a></div>
	<div class="content">
		<div class="home_nav">
			<div class="l"></div>
			<div class="c">
		        <ul>
		          <?php
		          	$current=-1;
					foreach($HomeMenu as $key=>$value){
						if(stripos($_SERVER['SCRIPT_NAME'],substr($value['value'],0,strpos($value['value'],'/')))){
							$current=$key;
						}
				  ?>
		          <li<?=($current==$key?' class="sel"':'')?>><a href="<?=domain?>home/<?=$value['value']?>"><?=$value['name']?></a></li>
		          <?php
					}
		          ?>
		          <li><a href="<?=domain?>action/logout.php">安全退出</a></li>
		        </ul>
			</div>
			<div class="r"></div>
		</div>
		<div class="manage">
			<div class="left">
				<div class="module">
					<div class="bar"><div>智能广告</div></div>
					<div class="handle">
						<div class="action">
							<div class="t">广告位列表</div>
							<div class="a"><a href="<?=domain?>home/module/system.php?action=append" class="button">添加广告位</a></div>
						</div>
						<div class="block">
								<table cellpadding="0" cellspacing="0" width="100%">
									<thead>
										<tr>
											<th>编号</th>
											<th>名称</th>
											<th>素材类型</th>
											<th>展现形式</th>
											<th>尺寸</th>
											<th>状态</th>
											<th>操作</th>
										</tr>
									</thead>
									<tbody>
										<?php
											foreach($board as $key=>$value){
										?>
										<tr <?=($key%2?'':'class="even"')?>>
											<td><a href="#"><?=$value['id']?></a></td>
											<td><?=$value['name']?></td>
											<td><?=($value['format']==0?'全部':$label[$value['format']]['name'])?></td>
											<td><?=$label[$value['usage']]['name']?></td>
											<td><?=$label[$value['modality']]['name']?></td>
											<td><?=($value['locked'])==0?'正常':'审核中'?></td>
											<td>
												<a href="<?=(domain.'home/module/system.php?action=code&board='.$value['id'])?>">代码</a>&nbsp;|&nbsp;
												<a href="<?=(domain.'home/module/system.php?action=edit&board='.$value['id'])?>">修改</a>&nbsp;|&nbsp;
												<a href="<?=(domain.'home/module/system.php?board='.$value['id'])?>" onclick="return window.confirm('是否确认删除?')">删除</a>
											</td>
										</tr>
										<?php
											}
										?>
									</tbody>
								</table>
						</div>
						<div class="pagination">
							<?=$pagination?>
						</div>
					</div>
				</div>
			</div>
			<div class="right">
				<div class="module">
					<div class="bar"><div><?=($HomeMenu[$current]['name'])?></div></div>
					<div class="handle">
						<?php
							foreach($HomeMenu[$current]['child'] as $key=>$value){
						?>
						<a href="<?=domain?>home/<?=$value['value']?>"><?=(stripos($_SERVER['SCRIPT_NAME'],strrchr($value['value'],'/'))!==false?'▬&nbsp;':'')?><?=$value['name']?></a>
						<?php
							}
						?>
					</div>
				</div>
			</div>
		</div>
		<div class="footer">
			<?=$foot?>
		</div>
	</div>
</div>
</body>
</html>